<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <title><?php echo $store_name;?></title>
        <meta charset="UTF-8">
        <meta name="description" content="<?php echo $action['action_name'];?>">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
        <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <script type='text/javascript' src='/public/js/jquery-3.1.1.min.js'></script>
        <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "//hm.baidu.com/hm.js?8d43b5b5d798921b66d689f7a792e6e2";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <script type="text/javascript">
            document.domain = '<?php echo _DOMAIN_ALL_;?>';
        </script>
        <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    </head>
    <body  >



<link href="/public/css/main.css" rel="stylesheet">
<div class="container"  >
    <div class='_main'>
        <div style='text-align:center;font-size:2rem;margin-top:1.5rem;' > <b>产品评价</b> </div>    
        <div class='_cut2' ></div>
                <span style='float:left;'></span>
                <div class='thumbnail' style="float:left;">
                    <div style="height:9rem;width:9rem;overflow: hidden;">
                        <img class='_img' src="<?php  echo 'http://'.IMAGE_DOMAIN_.$item['images'][0]['image'] ;?>" style='width:100%;height:100%'/>
                    </div>
                </div>
                <div style='margin-left:12rem;' >
                    <div  style='font-size:1.2rem;margin-top:1rem;font-size:1.7rem' ><?php echo $item['name'];?></div>
                    <div ><i><font style='color:red;'>￥<?php echo $item['price']/100; ?></font></i>
                        <span style='float:right;color:red'>待评价</span>
                    </div>
                    <?php if($item['items']){ foreach($item['items'] as $k=>$v){ ?>
                    <div>
                        <span> <?php echo $v['name']; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X<?php echo $v['number']; ?></span>
                    </div>
                    <?php } } ?>
                </div>
                <div style='clear:both;'></div>
               
                    <span style='font-size:2rem;height:3rem;float:left;' >总体评价：</span>
                    <div id="starBg1" class="star_bg">                      
                        <input type="radio" id="starScore1" class="score score_1" value="1" name="total">
                        <a href="#starScore1" class="star star_1" title="差"><label for="starScore1">差</label></a>
                        <input type="radio" id="starScore2" class="score score_2" value="2" name="total">
                        <a href="#starScore2" class="star star_2" title="较差"><label for="starScore2">较差</label></a>
                        <input type="radio" id="starScore3" class="score score_3" value="3" name="total">
                        <a href="#starScore3" class="star star_3" title="普通"><label for="starScore3">普通</label></a>
                        <input type="radio" id="starScore4" class="score score_4" value="4" name="total">
                        <a href="#starScore4" class="star star_4" title="较好"><label for="starScore4">较好</label></a>
                        <input type="radio" id="starScore5" class="score score_5" value="5" name="total">
                        <a href="#5" class="star star_5" title="好"><label for="starScore5">好</label></a>
                    </div>
                    <div  style='clear:both;' ></div>
                    <span style='font-size:2rem;height:3rem;float:left;' >门店环境：</span>
                    <div id="starBg2" class="star_bg">                      
                        <input type="radio" id="environment1" class="score score_1" value="1" name="environment">
                        <a href="#environment1" class="star star_1" title="差"><label for="environment1">差</label></a>
                        <input type="radio" id="environment2" class="score score_2" value="2" name="environment">
                        <a href="#environment2" class="star star_2" title="较差"><label for="environment2">较差</label></a>
                        <input type="radio" id="environment3" class="score score_3" value="3" name="environment">
                        <a href="#environment3" class="star star_3" title="普通"><label for="environment3">普通</label></a>
                        <input type="radio" id="environment4" class="score score_4" value="4" name="environment">
                        <a href="#environment4" class="star star_4" title="较好"><label for="environment4">较好</label></a>
                        <input type="radio" id="environment5" class="score score_5" value="5" name="environment">
                        <a href="#environment5" class="star star_5" title="好"><label for="environment5">好</label></a>
                    </div>
                    <div   style='clear:both;' ></div>
                    <span style='font-size:2rem;height:3rem;float:left;' >造&nbsp;型&nbsp;&nbsp;师：</span>
                    <div id="starBg3" class="star_bg">                      
                        <input type="radio" id="barber1" class="score score_1" value="1" name="barber">
                        <a href="#barber1" class="star star_1" title="差"><label for="barber1">差</label></a>
                        <input type="radio" id="barber2" class="score score_2" value="2" name="barber">
                        <a href="#barber2" class="star star_2" title="较差"><label for="barber2">较差</label></a>
                        <input type="radio" id="barber3" class="score score_3" value="3" name="barber">
                        <a href="#barber3" class="star star_3" title="普通"><label for="barber3">普通</label></a>
                        <input type="radio" id="barber4" class="score score_4" value="4" name="barber">
                        <a href="#barber4" class="star star_4" title="较好"><label for="barber4">较好</label></a>
                        <input type="radio" id="barber5" class="score score_5" value="5" name="score">
                        <a href="#barber5" class="star star_5" title="好"><label for="barber5">好</label></a>
                    </div>    
                    <textarea name='_text' id='_text'  class="_textarea" style='height:17rem;' ></textarea> 
                    <div class='_line3' ></div>
                    <div  style='text-align:center;' > <input class="btn btn-primary btn-lg" style="width:90%;background-color:#FF79BC;border-color:white" name="" type="button" id='_submit_' value="提交评价" >  </div>




<script type="text/javascript">
    $(document).ready(function(){
        $('#_submit_').click(function(){
            var user = $('#_user_').val();
            var total = $("input[name='total']:checked").val();
            var environment = $("input[name='environment']:checked").val();
            var barber = $("input[name='barber']:checked").val(); 
            var _mobile = /^(((1[1-9]{1}[0-9]{1})|(15[0-9]{1}))+\d{8})$/;
            var content = $('#_text').val();
            alert(total);
            alert(environment);
            alert(barber);
            if(total && environment && barber){
                    $.ajax({url: "/user//?store_id=<?php echo (int)$_GET['store_id'];?>&content=" + content+"&daan="+daan+"&mobile="+user, async: true, success: function (msg) {
                            if (msg == 'false') {
                                alert('提交失败！');
                            }else{
                                alert('提交成功！');
                                history.go(-1);
                            }
                        }

                    });
            }else{
                alert('请评价！');
                return;
            }    
                
            
        });
    })


</script>
</div>
<div class="_line"></div>
<div class='box navbar-fixed-bottom' style='background-color:#dddddd;'>
    <button class="btn btn-primary btn-lg"  type="button" id='shop' style="width:17%;background-color:#dddddd;border-color:#dddddd;color:black;font-size:10px"><img src="/public/images/ShopList.png" style='width:30px' ><br>
        <span style='margin-left:-0.8rem' >商品中心</span></button>
    <button class="btn btn-primary btn-lg"  type="button" id='action' style="width:17%;background-color:#dddddd;border-color:#dddddd;color:black;font-size:10px"><img src="/public/images/ActivityCenter.png" style='width:30px' ><br><span style='margin-left:-0.8rem'>活动中心</span></button>
    <button class="btn btn-primary btn-lg"  type="button" id='kaka' style="width:27%;background-color:#dddddd;border-color:#dddddd;color:black;"><img src="/public/images/kaka2.png" class="img-circle" style='height:60px;width:60px;margin-left:-3rem;position:absolute;top:0.2rem;' ></button>
    <button class="btn btn-primary btn-lg"  type="button" id='cart' style="width:17%;background-color:#dddddd;border-color:#dddddd;color:black;font-size:10px"><img src="/public/images/ShopCart.png" style='width:30px' ><br>购物车</button>
     <button class="btn btn-primary btn-lg"  type="button" id='user' style="width:17%;background-color:#dddddd;border-color:#dddddd;color:black;font-size:10px"><img src="/public/images/UserCenter.png" style='width:32px' ><br><span style='margin-left:-0.8rem'>个人中心</span></button>
</div>
<div id='showCode' style="text-align:center;width:100%;height:100%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8E8E8E',endColorstr='##8E8E8E');
    background-color:rgba(0, 0,0, 0.5);position:fixed; _position:absolute; top:0;left:0; z-index:5000;display:none "> 
    <div class="settle_div" >
        <div style='font-size:2rem'>门店信息</div>
        <div style='padding:4rem;'>
            <img src="<?php echo $logo ?>" style="width:80%" >
            <div style='font-size:1.5rem;' > <?php echo $store['name'] ?> </div>
            <div style='font-size:1.5rem;' >联系人： <?php echo $store['person_charge'] ?> </div>
            <div style='font-size:1.5rem;' >联系电话： <?php echo $store['tel'] ?> </div>
            <div style='font-size:1.5rem;' >地址： <?php echo $store['address'] ?> </div>  
        </div>
        <button class="btn btn-primary btn-lg"  type="button" id='hide' style="width:25%;background-color:#dddddd;border-color:#dddddd;color:black;">确定</button>
        <div class='_line'></div>
</div>

</div>
<div class='_line'></div>
</div>
    </body>
</html>
<script type="text/javascript">
    $(document).ready(function(){
        $('#shop').click(function(){
            window.location.href= '<?php echo shop_buildUrl("/user/shop"); ?>';
        });
        $('#action').click(function(){
            window.location.href= '<?php echo shop_buildUrl("/user/action"); ?>';
        });
        $('#kaka').click(function(){
            //门店信息
            $('#showCode').show();
        });
        $('#cart').click(function(){
            window.location.href= '<?php echo shop_buildUrl("/user/shop/shoppingcart"); ?>';
        });
        $('#user').click(function(){
            window.location.href= '<?php echo shop_buildUrl("/user/shop/personal"); ?>';
        });
        $('#hide').click(function(){
            //门店信息
            $('#showCode').hide();
        }); 
    })
</script>